<?xml version="1.0"?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

  <xsl:output method="xml" indent="yes"/>
  <xsl:param name="TASK_ID" select="'default value'"/>
  <xsl:param name="TARGET_ID" select="'default value'"/>
  <xsl:param name="DEFAULT_TARGET" select="'spawned target'"/>


  <xsl:template match="target">
    <xsl:element name = "project" >
        <xsl:attribute name = "name" >spawned project</xsl:attribute>
        <xsl:attribute name = "basedir" >.</xsl:attribute>
        <xsl:attribute name = "default" ><xsl:value-of select="$DEFAULT_TARGET"/></xsl:attribute>
        
        <xsl:element name = "target" >
          <xsl:attribute name = "name" ><xsl:value-of select="$DEFAULT_TARGET"/></xsl:attribute>
          <xsl:if test="@name = $TARGET_ID">
	    <xsl:copy-of select="remoteant/node()"/>	
          </xsl:if>
        </xsl:element>
    </xsl:element>

  </xsl:template>


<!--
  <xsl:template match="target">
     <project name="spawned ant project" basedir="." default="$DEFAULT_TARGET">
      <target name=""> <xsl:value-of select="$DEFAULT_TARGET"/>
         <xsl:if test="@name = $TARGET_ID">
	    <xsl:copy-of select="remoteant/node()"/>	
         </xsl:if>
       </target>
     </project>
  </xsl:template>
-->

</xsl:stylesheet>